def validate_lesson_search(ID, teacher, lesson):
    if (ID == '' and teacher == '' and lesson == '') or (ID is None and teacher is None and lesson is None):
        return 1
    elif is_number(ID) and int(ID) >= 0 or ID == '':
        if ID == '':
            ID = 0
        return 2
    else:
        return 0


def is_number(s):
    try:
        int(s)
        return True
    except ValueError:
        pass

    try:
        import unicodedata
        unicodedata.numeric(s)
        return True
    except (TypeError, ValueError):
        pass

    return False
